<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		h1 {
			width: 500px;
			height: 300px;
			line-height: 300px;
			background-image: linear-gradient(30deg, red, blue, green);
			margin: 0 auto;
			text-align: center;
			font-size: 80px;
			color: yellow;
		}

        @media print {
            h1 {
                font-size: 80px;
                background: none;
            }
        }

        @media all {
            h1 {
                color: gray;
            }
        }
        
        @media screen {
            h1 {
                color: white;
            }
        }
	</style>
</head>
<body>
	<h1>新年快乐</h1>
</body>
</html>